package com.example.archivemanagement.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.archivemanagement.entity.Archive;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

public interface ArchiveService extends IService<Archive> {
    Archive uploadArchive(MultipartFile file, Archive archive);
    Page<Archive> getRecentArchives(boolean isAdmin, int page, int size);
    Page<Archive> searchArchives(boolean isAdmin, String keyword, String category, String securityLevel, int page, int size);
    void deleteArchive(Long id);
    Archive updateArchive(Archive archive);
    List<Archive> getArchivesByCategory(String category);
    List<Archive> getArchivesBySecurityLevel(String securityLevel);

    Map<String, Long> getArchives();

    String view(Long id);
}